<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script type="application/javascript" src="jquery-3.6.1.js"></script>
<script type="application/javascript">

    console.log(a)
    var a = 'hello javascript'

    function saytype(x) {
        console.log(typeof x)
    }

    function cl(x) {
        console.log(x)
    }

    var obj1 = {
        '1p': 1,
        '2p': 'haha',
    }

    saytype(2)
    saytype('hello')
    saytype(document)
    console.log(0.1 + 0.2)
    cl(Number.MAX_VALUE)
    cl(5 - 'x')
    saytype(NaN)
    cl(parseInt(12.44))
    cl(btoa(a))
    cl(obj1)

    var f1=function (x) {
        cl(x)
    }

    f1(a)
    saytype(f1)
    cl(saytype.name)
    cl(saytype.length)

    var students={
        name:'lili',
        age:23,
    }

    for (var i in students){
        cl(students[i])
    }

    function evala() {
        'use strict';
        console.log('eval a');
    }
    cl(evala.toString())
    eval(evala.toString())

    var arr1=[1,2,3]
    arr1[100]=10
    cl(arr1.length)
    cl(arr1[90])
    for (var i in arr1){
        cl(arr1[i])
    }

    var error1=new Error('cuo wu')
    try{
        throw a
    }catch (e) {
        e.toString()
    }

    var languages = [
        { name: "JavaScript", fileExtension: ".js" },
        { name: "TypeScript", fileExtension: ".ts" },
        { name: "CoffeeScript", fileExtension: ".coffee" }
    ];

    console.table(languages);

    console.dir(new Object())
    cl(Object.keys(obj1))
    cl(Object.getOwnPropertyNames(languages))
    cl(languages.valueOf())

    cl($)

</script>
</html>